<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html lang="zh">
<head>
<%@include file="../../commons/meta.jsp"%>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<c:set var="baseUrl" value="${ctx}api/characterClass/" scope="request" />
<c:set var="dicUrl" value="${ctx}api/dic/" scope="request" />
<link rel="stylesheet" href="${ctx}assets/plugins/pure/pure-min.css"
	media="all" />
<script type="text/javascript"
	src="${ctx}assets/plugins/plupload/2.2.1/js/plupload.full.min.js"></script>
<script type="text/javascript"
	src="${ctx}assets/plugins/plupload/2.2.1/js/i18n/zh_CN.js"></script>

<script type="text/javascript">
function validateForm(){
	if(empty($("#name").val()) ){
		alertError("请输入性格类型");
		return false;
	}
	if(empty($("#description").val()) ){
		alertError("请输入描述");
		return false;
	}
	
	if(empty($("#recommendMajor").val())){
		alertError("请输入推荐专业");
		return false;
	}
	$("#forms").submit();
};

function back(){
	window.location.href = "${baseUrl}";
}
</script>
</head>
<body>
	<%@include file="../../commons/head.jsp"%>
	<div class="content">
		<%@include file="../../commons/menu.jsp"%>
		<!--右侧展示部分-->
		<div class="right-zq">
			<!--center content-->
			<div class="dynamic">
				<form class="" id="forms" method="post"
					action="${baseUrl}update">
					<div class="role dynamiclayer" style="display: block;">
						<div class="title orange2">
							<span class="left">专业评测管理</span> <label> > </label> <span>性格类型编辑</span>
						</div>
					<div class="news-table">
						<table>
							<tr>
								<td class="item">性格类型:</td>
								<td width="40%"><input class="p100" id="name"
									name="name" type="text" placeholder="请输入性格类型" value="${obj.name}" /></td>
							</tr>
							<tr>
								<td class="item">别名:</td>
								<td width="40%"><input class="p100" id="alias"
									name="alias" type="text" placeholder="请输入别名" value="${obj.alias}" /></td>
							</tr>
							<tr>
								<td class="item">描述:</td>
								<td width="60%"><textarea class="p100" id="description"
									name="description"  placeholder="请输入描述" rows="4">${obj.description}</textarea>
									</td>
							</tr>
							<tr>
								<td class="item">推荐专业:</td>
								<td width="60%"><textarea class="p100" id="recommendMajor"
									name="recommendMajor" placeholder="请输入推荐专业" rows="4">${obj.recommendMajor}</textarea>
								</td>
							</tr>
							
							<tr>
								<td></td>
								<td>
									<button class="orange2" type="button" onclick="validateForm()">
										保存&nbsp;<i class="fa fa-floppy-o"></i>
									</button> &nbsp;&nbsp;
									<button class="orange2" type="button" id="back_btn" onclick="back()">
										返回&nbsp;<i class="fa fa-undo"></i>
									</button>
								</td>
							</tr>
							
							<tr>
							<td><input id="fileId" name="id" type="hidden"  placeholder="" value="${obj.id }" /></td>
							</tr>
							</table>
					</div>
					</div>
				</form>
			</div>
		</div>
	</div>
	<%@include file="../../commons/footpop.jsp"%>
</body>
</html>